(function (doc, win) {
	let docEl = win.document.documentElement;
	let resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
	let refreshRem = function () {
		let clientWidth = win.innerWidth || doc.documentElement.clientWidth || doc.body.clientWidth;
		if (!clientWidth) return;
		let fz = 16 * clientWidth / 375;
		docEl.style.fontSize = fz + 'px';//这样每一份也是16px,即1rem=16px
	};
	if (!doc.addEventListener) return;
	win.addEventListener(resizeEvt, refreshRem, false);
	doc.addEventListener('DOMContentLoaded', refreshRem, false);
	refreshRem();
})(document, window);